using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Behavior:MonoBehaviour
{
    public double startTime, endTime;
    public bool isDone = false;
    public static int behaviorCount = 0;
    public delegate void doingDeleate();
    public doingDeleate doingThing; 
    public Behavior(double startTime,double delay)
    {
        this.startTime = startTime;
        this.endTime = startTime+delay;
        behaviorCount += 1;
    }
    public virtual void doing(double nowTime)
    {
        doingThing();
        if (nowTime>endTime)
        {
            isDone = true;
            return;
        }
        
    }
}
